Muiredach mac Brain (died 818) was a King of Leinster of the Uí Muiredaig sept of the Uí Dúnlainge branch of the Laigin. This sept had their royal seat at Maistiu (Mullaghmast) in South Kildare. He was the son of Bran Ardchenn mac Muiredaig (died 795), a previous king.[1] He ruled from 805 to 806 and again from 808 to 818.
Though not listed in the king list in the Book of Leinster, he is mentioned in the Irish annals.[2] He is given the title leth-ri (co-ruler) at his death obit in 818 and ruled in conjunction with Muiredach mac Ruadrach (died 829) of the Uí Fáeláin sept.[3]
In 795 his father, Bran, had been assassinated by his successor Fínsnechta Cethardec mac Cellaig (died 808) of the Uí Dúnchada sept as a direct challenge to the high-king. In 805 Fínsnechta was deposed by the high king Áed Oirdnide (died 819) of the Cenél nEógain who installed the two Muiredachs as kings instead.[4] Finsnechta took refuge with Muirgius mac Tommaltaig (died 815), the King of Connacht who then aided him in recovering his throne in 806.[5]
Upon the death of Finsnechta, the two Muiredachs then became the rulers. In 814 a battle is recorded between the Uí Cheinnselaig of south Leinster and the sons of Bran, who were the victors.[6] These were probably Muiredach and his brother Cellach mac Brain (died 834).[7] Upon the death of Muiredach mac Brain, Muiredach mac Ruadrach became sole ruler.
Muiredach's sons, Tuathal mac Muiredaig (died 854) and Dúnlaing mac Muiredaig (died 869) were also kings of Leinster. Another son Artúr mac Muiredaig (died 847) was king of western Liffey, Iarthair Liffey.